-
Notifications
You must be signed in to change notification settings - Fork 75
feat: Service extends IService #241
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,6 +12,7 @@ | |
|
|
||
| package com.tinyengine.it.service.app.impl; | ||
|
|
||
| import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | ||
| import com.tinyengine.it.common.base.Result; | ||
| import com.tinyengine.it.common.exception.ExceptionEnum; | ||
| import com.tinyengine.it.mapper.DatasourceMapper; | ||
|
|
@@ -33,7 +34,7 @@ | |
| */ | ||
| @Service | ||
| @Slf4j | ||
| public class DatasourceServiceImpl implements DatasourceService { | ||
| public class DatasourceServiceImpl extends ServiceImpl<DatasourceMapper, Datasource> implements DatasourceService { | ||
| @Autowired | ||
| private DatasourceMapper datasourceMapper; | ||
|
|
||
|
Comment on lines
+37
to
40
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Same mapper-duplication issue as in
🤖 Prompt for AI Agents |
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,6 +14,7 @@ | |
|
|
||
| import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | ||
| import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; | ||
| import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | ||
| import com.tinyengine.it.common.base.Result; | ||
|
Comment on lines
+17
to
18
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Same duplication pattern – rely on
Apply the same removal pattern as suggested for -@Autowired
-private PageMapper pageMapper;Then rename references ( Also applies to: 75-82 🤖 Prompt for AI Agents |
||
| import com.tinyengine.it.common.context.LoginUserContext; | ||
| import com.tinyengine.it.common.enums.Enums; | ||
|
|
@@ -71,7 +72,7 @@ | |
| */ | ||
| @Service | ||
| @Slf4j | ||
| public class PageServiceImpl implements PageService { | ||
| public class PageServiceImpl extends ServiceImpl<PageMapper, Page> implements PageService { | ||
| /** | ||
| * The Page mapper. | ||
| */ | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,6 +12,7 @@ | |
|
|
||
| package com.tinyengine.it.service.app.impl; | ||
|
|
||
| import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | ||
| import com.tinyengine.it.mapper.UserMapper; | ||
|
Comment on lines
+15
to
16
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Duplicate mapper injection – remove and use Same comment as above: -@Autowired
-private UserMapper userMapper;Then update the method bodies to Also applies to: 34-37 🤖 Prompt for AI Agents |
||
| import com.tinyengine.it.model.entity.User; | ||
| import com.tinyengine.it.service.app.UserService; | ||
|
|
@@ -30,7 +31,7 @@ | |
| */ | ||
| @Service | ||
| @Slf4j | ||
| public class UserServiceImpl implements UserService { | ||
| public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements UserService { | ||
| @Autowired | ||
| private UserMapper userMapper; | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Same layering concern: remove
@Paramand keep service layer free from MyBatis specificsSee comment in
AppService.🤖 Prompt for AI Agents