service层逻辑

没细看
>>>分页用的 com.github.pagehelper
也可以用sql limt 或者 ListMap.subList()
>>>@Autowired setter方式注入bean
降低代码入侵性
>>>
This commit is contained in:
dongl 2022-07-25 10:46:43 +08:00
parent f0d5216b3b
commit 561d8cd6a6
2 changed files with 6 additions and 0 deletions

View File

@ -81,6 +81,11 @@ public class CategoryService {
return categoryMapper.del(id) > 0;
}
/**
* 使用setter方式注入 降低代码入侵性
* @param categoryMapper dao层逻辑
* @return 注入至本对象
*/
@Autowired
public CategoryService setCategoryMapper(CategoryMapper categoryMapper) {
this.categoryMapper = categoryMapper;

View File

@ -21,6 +21,7 @@ import java.util.Objects;
*/
@Service
public class InventoryService {
private InventoryMapper inventoryMapper;
/**