MCPcopy
hub / github.com/lenve/VBlog / CategoryService

Class CategoryService

blogserver/src/main/java/org/sang/service/CategoryService.java:15–39  ·  view source on GitHub ↗

Created by sang on 2017/12/19.

Source from the content-addressed store, hash-verified

13 * Created by sang on 2017/12/19.
14 */
15@Service
16@Transactional
17public class CategoryService {
18 @Autowired
19 CategoryMapper categoryMapper;
20
21 public List<Category> getAllCategories() {
22 return categoryMapper.getAllCategories();
23 }
24
25 public boolean deleteCategoryByIds(String ids) {
26 String[] split = ids.split(",");
27 int result = categoryMapper.deleteCategoryByIds(split);
28 return result == split.length;
29 }
30
31 public int updateCategoryById(Category category) {
32 return categoryMapper.updateCategoryById(category);
33 }
34
35 public int addCategory(Category category) {
36 category.setDate(new Timestamp(System.currentTimeMillis()));
37 return categoryMapper.addCategory(category);
38 }
39}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected