|
|
@@ -1,29 +1,45 @@
|
|
|
-package ${package}.${moduleName}.service.impl;
|
|
|
+package ${package}.${moduleName}.biz.provider;
|
|
|
|
|
|
-import org.springframework.stereotype.Service;
|
|
|
-import java.util.Map;
|
|
|
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
-import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
-import ${mainPath}.common.utils.PageUtils;
|
|
|
-import ${mainPath}.common.utils.Query;
|
|
|
|
|
|
-import ${package}.${moduleName}.dao.${className}Dao;
|
|
|
-import ${package}.${moduleName}.entity.${className}Entity;
|
|
|
-import ${package}.${moduleName}.service.${className}Service;
|
|
|
|
|
|
+@Service
|
|
|
+public class ${className}ServiceImpl implements ${className}Service {
|
|
|
|
|
|
-@Service("${classname}Service")
|
|
|
-public class ${className}ServiceImpl extends ServiceImpl<${className}Dao, ${className}Entity> implements ${className}Service {
|
|
|
+ @Resource
|
|
|
+ private ${className}DAO dao;
|
|
|
|
|
|
@Override
|
|
|
- public PageUtils queryPage(Map<String, Object> params) {
|
|
|
- IPage<${className}Entity> page = this.page(
|
|
|
- new Query<${className}Entity>().getPage(params),
|
|
|
- new QueryWrapper<${className}Entity>()
|
|
|
- );
|
|
|
+ public ${className}Entity getById(Long id) {
|
|
|
+ return dao.getById(id);
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public List<${className}Entity> list(${className}Param param) {
|
|
|
+ return dao.list(param);
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public Long save(${className}Entity entity) {
|
|
|
+ return dao.save(entity);
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void update(${className}Entity entity) {
|
|
|
+ dao.update(entity);
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void remove(Long id) {
|
|
|
+ dao.remove(id);
|
|
|
+ }
|
|
|
|
|
|
- return new PageUtils(page);
|
|
|
+ @Override
|
|
|
+ public void removeByIds(List<Long> ids) {
|
|
|
+ dao.removeByIds(ids);
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public Page<${className}Entity> page(${className}Param param) {
|
|
|
+ return dao.listPage(param);
|
|
|
+ }
|
|
|
}
|